package com.zd.common.common.enums;

public enum PayTypeEnum {
	WX_PAY(1, "微信支付"),
	Ali_PAY(2, "支付宝支付"),
	Other_PAY(3, "其它");
	
	private int key;
	private String value;

	private PayTypeEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}


	public void setKey(int key) {
		this.key = key;
	}


	public String getValue() {
		return value;
	}


	public void setValue(String value) {
		this.value = value;
	}


	public static PayTypeEnum get(int key) {
		for (PayTypeEnum payType : PayTypeEnum.values()) {
			if (payType.getKey() == key) {
				return payType;
			}
		}
		return null;
	}
}
